<ion-view class="port-setting-view" view-title="设置">
    <ion-content scroll="false">
        <div class="im-grid">
            <div class="im-grid-header">
                <div class="row im-grid-record">
                    <div class="col im-record-column">外接设备</div>
                    <div class="col im-record-column">串口号</div>
                    <div class="col im-record-column">自动检测</div>
                </div>
                <div class="im-operate-column">操作</div>
            </div>
            <div class="im-grid-body" ng-if="data.bindDevices.length>0">
                <div class="im-grid-row" ng-repeat="device in data.bindDevices">
                    <div class="row im-grid-record">
                        <div class="col im-record-column">{{device.Name}}</div>
                        <div class="col im-record-column">{{device.Port}}</div>
                        <div class="col im-record-column port-button-column">
                            <button class="button" ng-click="startObserve(device)">{{device.Tip ? device.Tip : '开始'}}</button>
                        </div>
                    </div>
                    <div class="im-operate-column port-operate-column">
                        <i class="icon ion-plus-circled port-add" ng-click="addDevice()"></i>
                        <i class="icon ion-plus-circled port-delete" ng-click="deleteDevice($index, device)"></i>
                    </div>
                </div>
            </div>
        </div>
        <i class="icon ion-plus-circled default-add" ng-if="data.bindDevices.length===0" ng-click="addDevice()"></i>
    </ion-content>
</ion-view>